﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication2
{
    class Program
    {
        private static FileInfo[] getFilesFromFolder(string path)
        {
            DirectoryInfo folder1 = new DirectoryInfo(path);
            return folder1.GetFiles();
        }


        static void Main(string[] args)
        {
            FileInfo[] files1 = getFilesFromFolder(args[0]);
            FileInfo[] files2 = getFilesFromFolder(args[1]);

            foreach (FileInfo a in files1)
            {
                foreach (FileInfo b in files2)
                {
                    StreamReader sr = File.OpenText(args[0] + "/" +a.ToString());
                    string plik_a = sr.ReadToEnd();
                    sr.Close();
                    StreamReader sr2 = File.OpenText(args[1] + "/" + b.ToString());
                    string plik_b = sr2.ReadToEnd();
                    sr.Close();
                    if (plik_a == plik_b)
                    {
                        Console.WriteLine(args[0] + "/" + a.ToString() + " = " + args[1] + "/" + b.ToString());
                    }
                    // masz plik a z katalogu 1
                    // blik b z katalogu 2
     
                }

            }
            //Console.ReadLine();
        }
    }
}
